Developer Documentation

QuickTime 4 API Documentation

QuickTime 4 Reference

| Previous | Chapter Contents | Chapter Top | Next |

Creating and Disposing of Atom Containers

Before you can add atoms to an atom container, you must first create the container by calling QTNewAtomContainer . The code sample shown in Listing 3 calls QTNewAtomContainer to create an atom container.

Listing 3 Creating a new atom container

QTAtomContainer spriteData;
OSErr err
// create an atom container to hold a sprite's data
err=QTNewAtomContainer (&spriteData);

When you have finished using an atom container, you should dispose of it by calling the QTDisposeAtomContainer function. The sample code shown in Listing 4 calls QTDisposeAtomContainer to dispose of the spriteData atom container.

Listing 4 Disposing of an atom container

if (spriteData)
    QTDisposeAtomContainer (spriteData);

© 1999 Apple Computer, Inc.

| Previous | Chapter Contents | Chapter Top | Next |